const rand = require('./randUtil');

const userModel = (_do, postData, isWeb, userData) => {

    return JSON.stringify({
        mod: "User",
        do: _do,
        p: {
            ...postData,
            web: isWeb,
            clientVersion: {android: "2.4.7"},
            NeedUpdateVersion: "3.1.4",
            ...userData,
            nonce: new Date().getTime() + rand.randStr(8)
        }
    }).replaceAll(" ", "");
}

module.exports = {
    userModel
}